<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>乐淘商城-购物车</title>
  <!-- 加视口 -->
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  
  <!-- 字体图标库 -->
  <link rel="stylesheet" href="lib/fa/css/font-awesome.css">
  <!-- mui css -->
  <link rel="stylesheet" href="lib/mui/css/mui.css">
  
  <!-- 引入自己的 css -->
  <link rel="stylesheet" href="css/common.css">
  <link rel="stylesheet" href="css/cart.css">
</head>
<body>


<div class="lt_container">
  <!-- 头部 -->
  <div class="lt_header">
    <a class="icon_left" href="javascript:history.go(-1);"><span class="mui-icon mui-icon-back"></span></a>
    <h3 class="header_title">购物车</h3>
  </div>
  
  
  <!-- 主体部分 -->
  <div class="lt_main">
    <!-- 配置区域滚动 -->
    <div class="mui-scroll-wrapper">
      <div class="mui-scroll">
        
        <ul id="itemList" class="mui-table-view">

        </ul>
        
      </div>
    </div>
  
  </div>
  
  
  <!-- 底部部分 -->
  <div class="lt_footer">
    <ul>
      <li>
        <a href="index.html">
          <span class="fa fa-home"></span>
          <p>首页</p>
        </a>
      </li>
      <li>
        <a href="category.html">
          <span class="fa fa-bars"></span>
          <p>分类</p>
        </a>
      </li>
      <li class="now">
        <a href="cart.html">
          <span class="fa fa-shopping-cart"></span>
          <p>购物车</p>
        </a>
      </li>
      <li>
        <a href="user.html">
          <span class="fa fa-user"></span>
          <p>会员中心</p>
        </a>
      </li>
    </ul>
  </div>
</div>


<script type="text/html" id="cartTpl">
  {{ each arr v i }}
    <li class="mui-table-view-cell">
      <div class="mui-slider-right mui-disabled">
        <a class="mui-btn mui-icon mui-btn-grey mui-icon-compose btn_edit"
           data-id = "{{ v.id }}"
           data-num = "{{ v.num }}"
           data-size = "{{ v.size }}"
           data-productNum = "{{ v.productNum }}"
           data-productSize = "{{ v.productSize }}"
        ></a>
        <a data-id="{{ v.id }}" class="mui-btn mui-icon mui-btn-grey mui-icon-trash btn_delete"></a>
      </div>
      <div class="mui-slider-handle">
        <div class="mui-table-cell">
        
          <div class="img_box">
            <label>
              <img src="{{ v.pic[0].picAddr }}">
              <input type="checkbox" class="ck">
            </label>
          </div>
        
          <div class="info_box">
            <p class="mui-ellipsis-2 productName">
              {{ v.proName }}
            </p>
            <p>
              <span class="price">¥{{ v.price }}</span>
              <span class="oldPrice">¥{{ v.oldPrice }}</span>
              <span class="num">{{ v.num }}双</span>
            </p>
            <p class="size">
              鞋码: {{ v.size }}
            </p>
          </div>
      
        </div>
      </div>
    </li>
  {{ /each }}
</script>


<script type="text/html" id="editTpl">
  
   <div class="lt_edit_size">
     <strong>尺码:</strong>
     <%
        var temp = productsize.split("-"); // [ "40", "50" ];
        for ( var i = temp[0]; i <= temp[1]; i++ ) {
     %>
        <span class="size {{ i == size ? 'now' : '' }}">{{ i }}</span>
     <%
        }
     %>
     
   </div>
   <div class="lt_edit_num">
     <strong>数量:</strong>
     <div class="mui-numbox" data-numbox-step='1' data-numbox-min='0' data-numbox-max='{{ productnum }}'>
       <button class="mui-btn mui-numbox-btn-minus" type="button">-</button>
       <input class="mui-numbox-input" type="number" value="{{ num }}">
       <button class="mui-btn mui-numbox-btn-plus" type="button">+</button>
     </div>
   </div>
</script>



<!-- 模板引擎 -->
<script src="lib/artTemplate/template-web.js"></script>
<!-- mui 核心js 文件 -->
<script src="lib/mui/js/mui.js"></script>
<!-- zepto -->
<script src="lib/zepto/zepto.min.js"></script>
<!-- 自己的 js 文件 -->
<script src="js/common.js"></script>

<script src="js/cart.js"></script>

</body>
</html>